package kr.co.doriclassic.summary_java.dto;

public class CodeTitle implements Comparable<CodeTitle>{
	
	private int titleNo;
	private String titleName;
	
	public CodeTitle() {
		
	}
	public CodeTitle(int titleNo, String titleName) {
		this.titleNo = titleNo;
		this.titleName = titleName;
	}
	public int getTitleNo() {
		return titleNo;
	}
	public void setTitleNo(int titleNo) {
		this.titleNo = titleNo;
	}
	public String getTitleName() {
		return titleName;
	}
	public void setTitleName(String titleName) {
		this.titleName = titleName;
	}
	@Override
	public String toString() {
		return String.format("CodeTitle [titleNo=%s, titleName=%s]", titleNo,
				titleName);
	}
	@Override
	public int compareTo(CodeTitle o) {
		return getTitleNo()-o.getTitleNo();
	}
}
